<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>TWTRCoreOAuthSigning Protocol Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1333)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">TwitterCore </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Twitter Inc.</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/OAuthEchoHeadersForRequestMethod:URLString:parameters:error:">- OAuthEchoHeadersForRequestMethod:URLString:parameters:error:</option>
		
		<option value="//api/name/OAuthEchoHeadersToVerifyCredentials">- OAuthEchoHeadersToVerifyCredentials</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">TWTRCoreOAuthSigning Protocol Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Conforms to</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>TWTRCoreOAuthSigning.h</td>
</tr>
						</tbody></table></div>
					

                    

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						<a title="OAuth Echo" name="task_OAuth Echo"></a>
						
<h2 class="task-title">OAuth Echo</h2>
						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/OAuthEchoHeadersForRequestMethod:URLString:parameters:error:" title="OAuthEchoHeadersForRequestMethod:URLString:parameters:error:"></a>
	<h3 class="method-title"><code><a href="#//api/name/OAuthEchoHeadersForRequestMethod:URLString:parameters:error:">&ndash;&nbsp;OAuthEchoHeadersForRequestMethod:URLString:parameters:error:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>OAuth Echo is a means to securely delegate OAuth authorization to a third party while interacting with an API.
For example, you may wish to verify a user&rsquo;s credentials from your app&rsquo;s server (the third party) rather than your app.
This method provides you with the OAuth signature to add to the third party&rsquo;s request to <code>URLString</code>, as well as the formed
URL with the query string to send that request to.
This is equivalent to calling <code>-URLRequestWithMethod:URL:parameters:error:</code> and getting the URL and the <code>Authorization</code> HTTP header out of the request.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NSDictionary *)OAuthEchoHeadersForRequestMethod:(NSString *)<em>method</em> URLString:(NSString *)<em>URLString</em> parameters:(nullable NSDictionary *)<em>parameters</em> error:(NSError **)<em>error</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>method</code></th>
						<td><p>Request method, GET, POST, PUT, DELETE, etc.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>URLString</code></th>
						<td><p>The full URL of the Twitter endpoint you plan to send a request to. E.g. <a href="https://api.twitter.com/1.1/account/verify_credentials.json">https://api.twitter.com/1.1/account/verify_credentials.json</a></p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>parameters</code></th>
						<td><p>Request parameters.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>error</code></th>
						<td><p>Error in the <code>TWTRErrorDomain</code> domain. The code will be <code>TWTRErrorCodeInvalidURL</code> if the <code>URLString</code>&rsquo;s host is not api.twitter.com</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p><code>nil</code> if there&rsquo;s an error or a missing required parameter, or a dictionary with the fully formed request URL under <code>TWTROAuthEchoRequestURLStringKey</code> (<code>NSString</code>), and the <code>Authorization</code> header in <code>TWTROAuthEchoAuthorizationHeaderKey</code> (<code>NSString</code>), to be used to sign the request.</p>
			</div>
			

			

			

			

			
			<div class="method-subsection see-also-section">
				<h4 class="method-subtitle">See Also</h4>
				<ul>
					
					<li><code><p>More information about OAuth Echo: <a href="https://dev.twitter.com/oauth/echo">https://dev.twitter.com/oauth/echo</a></p></code></li>
					
				</ul>
			</div>
			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRCoreOAuthSigning.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/OAuthEchoHeadersToVerifyCredentials" title="OAuthEchoHeadersToVerifyCredentials"></a>
	<h3 class="method-title"><code><a href="#//api/name/OAuthEchoHeadersToVerifyCredentials">&ndash;&nbsp;OAuthEchoHeadersToVerifyCredentials</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>This method provides you with the OAuth signature, as well as the formed URL with the query string, to send a request to <code>verify_credentials</code>.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NSDictionary *)OAuthEchoHeadersToVerifyCredentials</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>A dictionary with the fully formed Request URL under <code>TWTROAuthEchoRequestURLStringKey</code> (<code>NSString</code>), and the <code>Authorization</code> header in <code>TWTROAuthEchoAuthorizationHeaderKey</code> (<code>NSString</code>), to be used to sign the request.</p>
			</div>
			

			

			

			

			
			<div class="method-subsection see-also-section">
				<h4 class="method-subtitle">See Also</h4>
				<ul>
					
					<li><code><p>More information about OAuth Echo: <a href="https://dev.twitter.com/oauth/echo">https://dev.twitter.com/oauth/echo</a></p></code></li>
					
					<li><code><p>More information about Verify Credentials: <a href="https://dev.twitter.com/rest/reference/get/account/verify_credentials">https://dev.twitter.com/rest/reference/get/account/verify_credentials</a></p></code></li>
					
				</ul>
			</div>
			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRCoreOAuthSigning.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2017 Twitter Inc. All rights reserved. Updated: 2017-12-13</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>